package gui;

import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JButton;
import java.awt.BorderLayout;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.GridBagLayout;
import java.awt.GridBagConstraints;
import javax.swing.SpringLayout;
import java.awt.FlowLayout;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.JTextArea;
import javax.swing.LayoutStyle.ComponentPlacement;
import javax.swing.JTextField;
import javax.swing.JFormattedTextField;
import javax.swing.JLabel;
import javax.swing.JRadioButton;
import javax.swing.JPanel;
import com.jgoodies.forms.factories.DefaultComponentFactory;

public class MainWindow {

	private JFrame MainWindow;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					MainWindow window = new MainWindow();
					window.MainWindow.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the application.
	 */
	public MainWindow() {
		initialize();
	}

	/**
	 * Initialize the contents of the frame.
	 */
	private void initialize() {
		MainWindow = new JFrame();
		MainWindow.setTitle("Application");
		MainWindow.setBounds(100, 100, 450, 250);
		MainWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		
		JPanel panel = new JPanel();
		GroupLayout groupLayout = new GroupLayout(MainWindow.getContentPane());
		groupLayout.setHorizontalGroup(
			groupLayout.createParallelGroup(Alignment.TRAILING)
				.addComponent(panel, GroupLayout.DEFAULT_SIZE, 442, Short.MAX_VALUE)
		);
		groupLayout.setVerticalGroup(
			groupLayout.createParallelGroup(Alignment.TRAILING)
				.addComponent(panel, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 224, Short.MAX_VALUE)
		);
		
		JButton MwbtnOk = new JButton("OK");
		
		JButton MwbtnCancel = new JButton("Cancel");
		
		JLabel lblWhichTransformationDo = new JLabel("Which transformation do you want to perform?");
		
		JRadioButton Mwrdbtn1 = new JRadioButton("From Express file (.exp) to Express Xml file");
		
		JRadioButton Mwrdbtn2 = new JRadioButton("From Express file (.exp) to AltaRica Xml file");
		
		JRadioButton Mwrdbtn3 = new JRadioButton("From Express Xml file to AltaRica Xml file");
		GroupLayout gl_panel = new GroupLayout(panel);
		gl_panel.setHorizontalGroup(
			gl_panel.createParallelGroup(Alignment.LEADING)
				.addGroup(Alignment.TRAILING, gl_panel.createSequentialGroup()
					.addContainerGap(169, Short.MAX_VALUE)
					.addComponent(MwbtnOk)
					.addPreferredGap(ComponentPlacement.UNRELATED)
					.addComponent(MwbtnCancel)
					.addGap(27))
				.addGroup(gl_panel.createSequentialGroup()
					.addGap(47)
					.addComponent(lblWhichTransformationDo)
					.addContainerGap(325, Short.MAX_VALUE))
				.addGroup(gl_panel.createSequentialGroup()
					.addGap(70)
					.addGroup(gl_panel.createParallelGroup(Alignment.LEADING)
						.addComponent(Mwrdbtn3)
						.addComponent(Mwrdbtn2)
						.addComponent(Mwrdbtn1))
					.addContainerGap(48, Short.MAX_VALUE))
		);
		gl_panel.setVerticalGroup(
			gl_panel.createParallelGroup(Alignment.LEADING)
				.addGroup(Alignment.TRAILING, gl_panel.createSequentialGroup()
					.addGap(31)
					.addComponent(lblWhichTransformationDo)
					.addGap(18)
					.addComponent(Mwrdbtn1)
					.addPreferredGap(ComponentPlacement.UNRELATED)
					.addComponent(Mwrdbtn2)
					.addPreferredGap(ComponentPlacement.UNRELATED)
					.addComponent(Mwrdbtn3)
					.addPreferredGap(ComponentPlacement.RELATED, 46, Short.MAX_VALUE)
					.addGroup(gl_panel.createParallelGroup(Alignment.BASELINE)
						.addComponent(MwbtnOk)
						.addComponent(MwbtnCancel))
					.addContainerGap())
		);
		panel.setLayout(gl_panel);
		MainWindow.getContentPane().setLayout(groupLayout);
	}
}
